Integrand size = 23, antiderivative size = 151 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=a^4 A x+\frac {a^4 (48 A+35 B) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {5 a^4 (8 A+7 B) \tan (c+d x)}{8 d}+\frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {(32 A+35 B) \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{24 d} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {4002, 3999, 3852, 8, 3855} \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {a^4 (48 A+35 B) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {5 a^4 (8 A+7 B) \tan (c+d x)}{8 d}+\frac {(32 A+35 B) \tan (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{24 d}+a^4 A x+\frac {(4 A+7 B) \tan (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{12 d}+\frac {a B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3999
Rule 4002
Rubi steps \begin{align*} \text {integral}& = \frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {1}{4} \int (a+a \sec (c+d x))^3 (4 a A+a (4 A+7 B) \sec (c+d x)) \, dx \\ & = \frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {1}{12} \int (a+a \sec (c+d x))^2 \left (12 a^2 A+a^2 (32 A+35 B) \sec (c+d x)\right ) \, dx \\ & = \frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {(32 A+35 B) \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{24 d}+\frac {1}{24} \int (a+a \sec (c+d x)) \left (24 a^3 A+15 a^3 (8 A+7 B) \sec (c+d x)\right ) \, dx \\ & = a^4 A x+\frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {(32 A+35 B) \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{24 d}+\frac {1}{8} \left (5 a^4 (8 A+7 B)\right ) \int \sec ^2(c+d x) \, dx+\frac {1}{8} \left (a^4 (48 A+35 B)\right ) \int \sec (c+d x) \, dx \\ & = a^4 A x+\frac {a^4 (48 A+35 B) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {(32 A+35 B) \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{24 d}-\frac {\left (5 a^4 (8 A+7 B)\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{8 d} \\ & = a^4 A x+\frac {a^4 (48 A+35 B) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {5 a^4 (8 A+7 B) \tan (c+d x)}{8 d}+\frac {a B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 d}+\frac {(4 A+7 B) \left (a^2+a^2 \sec (c+d x)\right )^2 \tan (c+d x)}{12 d}+\frac {(32 A+35 B) \left (a^4+a^4 \sec (c+d x)\right ) \tan (c+d x)}{24 d} \\ \end{align*}
Time = 4.73 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.18 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=a^4 A x+\frac {6 a^4 A \text {arctanh}(\sin (c+d x))}{d}+\frac {35 a^4 B \text {arctanh}(\sin (c+d x))}{8 d}+\frac {7 a^4 A \tan (c+d x)}{d}+\frac {8 a^4 B \tan (c+d x)}{d}+\frac {2 a^4 A \sec (c+d x) \tan (c+d x)}{d}+\frac {27 a^4 B \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a^4 B \sec ^3(c+d x) \tan (c+d x)}{4 d}+\frac {a^4 A \tan ^3(c+d x)}{3 d}+\frac {4 a^4 B \tan ^3(c+d x)}{3 d} \]
[In]
[Out]
Time = 4.38 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.30
method | result | size |
parts | \(a^{4} A x -\frac {\left (a^{4} A +4 B \,a^{4}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (4 a^{4} A +B \,a^{4}\right ) \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {\left (4 a^{4} A +6 B \,a^{4}\right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {\left (6 a^{4} A +4 B \,a^{4}\right ) \tan \left (d x +c \right )}{d}+\frac {B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(196\) |
parallelrisch | \(\frac {44 \left (-\frac {18 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {35 B}{48}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{11}+\frac {18 \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \left (A +\frac {35 B}{48}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{11}+\frac {3 A x d \cos \left (2 d x +2 c \right )}{11}+\frac {3 A x d \cos \left (4 d x +4 c \right )}{44}+\left (A +\frac {14 B}{11}\right ) \sin \left (2 d x +2 c \right )+\frac {3 \left (A +\frac {27 B}{16}\right ) \sin \left (3 d x +3 c \right )}{11}+\frac {5 \left (A +B \right ) \sin \left (4 d x +4 c \right )}{11}+\frac {3 \left (A +\frac {35 B}{16}\right ) \sin \left (d x +c \right )}{11}+\frac {9 A x d}{44}\right ) a^{4}}{3 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(207\) |
derivativedivides | \(\frac {-a^{4} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+4 a^{4} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 B \,a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+6 a^{4} A \tan \left (d x +c \right )+6 B \,a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 a^{4} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 B \,a^{4} \tan \left (d x +c \right )+a^{4} A \left (d x +c \right )+B \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(250\) |
default | \(\frac {-a^{4} A \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{4} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+4 a^{4} A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-4 B \,a^{4} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+6 a^{4} A \tan \left (d x +c \right )+6 B \,a^{4} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+4 a^{4} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+4 B \,a^{4} \tan \left (d x +c \right )+a^{4} A \left (d x +c \right )+B \,a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) | \(250\) |
norman | \(\frac {a^{4} A x +a^{4} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-4 a^{4} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+6 a^{4} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-4 a^{4} A x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-\frac {5 a^{4} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {3 a^{4} \left (24 A +31 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a^{4} \left (424 A +385 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {a^{4} \left (520 A +511 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}-\frac {a^{4} \left (48 A +35 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a^{4} \left (48 A +35 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(252\) |
risch | \(a^{4} A x -\frac {i a^{4} \left (48 A \,{\mathrm e}^{7 i \left (d x +c \right )}+81 B \,{\mathrm e}^{7 i \left (d x +c \right )}-144 A \,{\mathrm e}^{6 i \left (d x +c \right )}-96 B \,{\mathrm e}^{6 i \left (d x +c \right )}+48 A \,{\mathrm e}^{5 i \left (d x +c \right )}+105 B \,{\mathrm e}^{5 i \left (d x +c \right )}-480 A \,{\mathrm e}^{4 i \left (d x +c \right )}-480 B \,{\mathrm e}^{4 i \left (d x +c \right )}-48 A \,{\mathrm e}^{3 i \left (d x +c \right )}-105 B \,{\mathrm e}^{3 i \left (d x +c \right )}-496 A \,{\mathrm e}^{2 i \left (d x +c \right )}-544 B \,{\mathrm e}^{2 i \left (d x +c \right )}-48 \,{\mathrm e}^{i \left (d x +c \right )} A -81 B \,{\mathrm e}^{i \left (d x +c \right )}-160 A -160 B \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {6 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{8 d}+\frac {6 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {35 a^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{8 d}\) | \(293\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.04 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {48 \, A a^{4} d x \cos \left (d x + c\right )^{4} + 3 \, {\left (48 \, A + 35 \, B\right )} a^{4} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (48 \, A + 35 \, B\right )} a^{4} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (160 \, {\left (A + B\right )} a^{4} \cos \left (d x + c\right )^{3} + 3 \, {\left (16 \, A + 27 \, B\right )} a^{4} \cos \left (d x + c\right )^{2} + 8 \, {\left (A + 4 \, B\right )} a^{4} \cos \left (d x + c\right ) + 6 \, B a^{4}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
[In]
[Out]
\[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=a^{4} \left (\int A\, dx + \int 4 A \sec {\left (c + d x \right )}\, dx + \int 6 A \sec ^{2}{\left (c + d x \right )}\, dx + \int 4 A \sec ^{3}{\left (c + d x \right )}\, dx + \int A \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec {\left (c + d x \right )}\, dx + \int 4 B \sec ^{2}{\left (c + d x \right )}\, dx + \int 6 B \sec ^{3}{\left (c + d x \right )}\, dx + \int 4 B \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{5}{\left (c + d x \right )}\, dx\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 293 vs. \(2 (141) = 282\).
Time = 0.22 (sec) , antiderivative size = 293, normalized size of antiderivative = 1.94 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a^{4} + 48 \, {\left (d x + c\right )} A a^{4} + 64 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{4} - 3 \, B a^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 48 \, A a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 72 \, B a^{4} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 192 \, A a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 48 \, B a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 288 \, A a^{4} \tan \left (d x + c\right ) + 192 \, B a^{4} \tan \left (d x + c\right )}{48 \, d} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.48 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {24 \, {\left (d x + c\right )} A a^{4} + 3 \, {\left (48 \, A a^{4} + 35 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (48 \, A a^{4} + 35 \, B a^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (120 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 105 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 424 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 385 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 520 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 511 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 216 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 279 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
[In]
[Out]
Time = 13.79 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.69 \[ \int (a+a \sec (c+d x))^4 (A+B \sec (c+d x)) \, dx=\frac {2\,A\,a^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {12\,A\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {35\,B\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4\,d}+\frac {20\,A\,a^4\,\sin \left (c+d\,x\right )}{3\,d\,\cos \left (c+d\,x\right )}+\frac {2\,A\,a^4\,\sin \left (c+d\,x\right )}{d\,{\cos \left (c+d\,x\right )}^2}+\frac {A\,a^4\,\sin \left (c+d\,x\right )}{3\,d\,{\cos \left (c+d\,x\right )}^3}+\frac {20\,B\,a^4\,\sin \left (c+d\,x\right )}{3\,d\,\cos \left (c+d\,x\right )}+\frac {27\,B\,a^4\,\sin \left (c+d\,x\right )}{8\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {4\,B\,a^4\,\sin \left (c+d\,x\right )}{3\,d\,{\cos \left (c+d\,x\right )}^3}+\frac {B\,a^4\,\sin \left (c+d\,x\right )}{4\,d\,{\cos \left (c+d\,x\right )}^4} \]
[In]
[Out]